package com.qingfeng.testandroid12sdkdemo.activity;

import android.view.View;
import android.widget.ImageView;

import androidx.core.content.ContextCompat;

import com.qingfeng.testandroid12sdkdemo.R;
import com.qingfeng.testandroid12sdkdemo.data.entity.CustomViewsInfo;
import com.stx.xhb.androidx.holder.ViewHolder;

public class ImageViewHolder  implements ViewHolder<CustomViewsInfo> {

    @Override
    public int getLayoutId() {
        return R.layout.layout_image_view;
    }

    @Override
    public void onBind(View itemView, CustomViewsInfo data, int position) {
        ImageView imageView = itemView.findViewById(R.id.iv);
//        Glide.with(itemView.getContext()).load(data.getXBannerUrl()).placeholder(R.drawable.default_image).error(R.drawable.default_image).into(imageView);
        imageView.setBackground(ContextCompat.getDrawable(itemView.getContext(),R.drawable.empty_drawable));
    }


}

